﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CO9APPFORM
{
    public static class UIHelper
    {
        public static decimal? GetNullableDecimalFromString(string s)
        {
            try
            {
                return decimal.Parse(s);
            }
            catch
            {
                return null;
            }
        }

        public static string DisplayNullableDecimal(decimal? d)
        {
            try
            {
                return d.ToString();
            }
            catch
            {
                return "";
            }
        }
    }
}